/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.web.entity;

import java.math.BigDecimal;
import java.util.Date;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.modules.sys.entity.User;

/**
 * 代理商Entity
 *
 * @author rongjie
 * @version 2017-08-06
 */
public class WxAgents extends DataEntity<WxAgents> {

	private static final long serialVersionUID = 1L;
	private String userName; // 代理商账户
	private String password; // 代理商密码
	private String address; // 地址
	private BigDecimal proportion; // 分销比例
	private int status; // 状态 0审核未通过 1审核已通过
	private String text; // 合同内容
	private Double money; // 代理商密码
	private Date time; // 注册时间
	private Date setTime; // 上次登录时间

	// 父级编号
	private Integer parentId;
	// 所有父级编号
	private String parentIds;

	private Integer agentLevel;
	// ALTER TABLE `wx_agents` ADD COLUMN `parent_id` int(11) COMMENT '上级id';
	// ALTER TABLE `wx_agents` ADD COLUMN `parent_ids` VARCHAR(100) COMMENT
	// '所有上级id，最多3级';

	// 代理商关联的用户信息
	private User user;

	// 代理商关联的父级代理商信息
	private WxAgents parentAgents;
	// 代理商关联的代理商层级信息
	private WxAgentsLevel wxAgentsLevel;
	// 父级编号
	private Integer ywyAgentsId;
	private WxAgents ywyAgents;

	// 提示消息
	private String message;

	private String province;
	private String city;
	private String district;
	private String ratioId;
	private YjCommissionRatio commissionRatio;
	private Integer deviceType;
	private BigDecimal commission;
	private BigDecimal ktxcommission;
	private BigDecimal gdktxcommission;


	public WxAgents() {
		super();
		this.setIdType(IDTYPE_AUTO);
	}

	public WxAgents(String id) {
		super(id);
	}

	@Length(min = 1, max = 30, message = "代理商账户长度必须介于 1 和 30 之间")
	@ExcelField(title = "代理商账户", align = 2, sort = 3)
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Length(min = 1, max = 30, message = "代理商密码长度必须介于 1 和 30 之间")
	@ExcelField(title = "代理商密码", align = 2, sort = 4)
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title = "注册时间", align = 2, sort = 5)
	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title = "上次登录时间", align = 2, sort = 6)
	public Date getSetTime() {
		return setTime;
	}

	public void setSetTime(Date setTime) {
		this.setTime = setTime;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public BigDecimal getProportion() {
		return proportion;
	}

	public void setProportion(BigDecimal proportion) {
		this.proportion = proportion;
	}

	public Double getMoney() {
		return money;
	}

	public void setMoney(Double money) {
		this.money = money;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public String getParentIds() {
		return parentIds;
	}

	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Integer getAgentLevel() {
		return agentLevel;
	}

	public void setAgentLevel(Integer agentLevel) {
		this.agentLevel = agentLevel;
	}

	public WxAgents getParentAgents() {
		return parentAgents;
	}

	public void setParentAgents(WxAgents parentAgents) {
		this.parentAgents = parentAgents;
	}

	public WxAgentsLevel getWxAgentsLevel() {
		return wxAgentsLevel;
	}

	public void setWxAgentsLevel(WxAgentsLevel wxAgentsLevel) {
		this.wxAgentsLevel = wxAgentsLevel;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getDistrict() {
		return district;
	}

	public void setDistrict(String district) {
		this.district = district;
	}

	public String getRatioId() {
		return ratioId;
	}

	public void setRatioId(String ratioId) {
		this.ratioId = ratioId;
	}

	public YjCommissionRatio getCommissionRatio() {
		return commissionRatio;
	}

	public void setCommissionRatio(YjCommissionRatio commissionRatio) {
		this.commissionRatio = commissionRatio;
	}

	public Integer getDeviceType() {
		return deviceType;
	}

	public void setDeviceType(Integer deviceType) {
		this.deviceType = deviceType;
	}

	public BigDecimal getCommission() {
		return commission;
	}

	public void setCommission(BigDecimal commission) {
		this.commission = commission;
	}

	public BigDecimal getKtxcommission() {
		return ktxcommission;
	}

	public void setKtxcommission(BigDecimal ktxcommission) {
		this.ktxcommission = ktxcommission;
	}

    public BigDecimal getGdktxcommission() {
        return gdktxcommission;
    }

    public void setGdktxcommission(BigDecimal gdktxcommission) {
        this.gdktxcommission = gdktxcommission;
    }

	public Integer getYwyAgentsId() {
		return ywyAgentsId;
	}

	public void setYwyAgentsId(Integer ywyAgentsId) {
		this.ywyAgentsId = ywyAgentsId;
	}

	public WxAgents getYwyAgents() {
		return ywyAgents;
	}

	public void setYwyAgents(WxAgents ywyAgents) {
		this.ywyAgents = ywyAgents;
	}
}
